package com.zby.big_event_zby.controller;

import com.zby.big_event_zby.pojo.Result;
import com.zby.big_event_zby.utils.JwtUtils;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.management.monitor.GaugeMonitor;
import java.util.Map;

/**
 * @version 1.0
 * @auther ZBY
 */
@RestController
@RequestMapping("/article")
public class ArticleController {
    @GetMapping("/list")
    public Result<String> listArticle(){
        //利用jwt验证token

//
//        try {
//            Map<String, Object> stringObjectMap = JwtUtils.pareseToken(token);
//            return Result.success("文章数据加载成功...");
//        } catch (Exception e) {
//            //http响应码为401
//
//            response.setStatus(401);
//            return Result.error("token失效，请重新登录");
//        }


        return Result.success("文章数据加载成功...");
    }

}
